<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<form><input id="todoName" type="text"><input type="submit" value="submit"></form>
</body>
<script>
  const electron = require('electron');
  const { ADD_TODO } = require('./ipcTodo.js');
  const { ipcRenderer } = electron;
  document.querySelector('form').addEventListener('submit', (event) => {
    const todo = document.getElementById('todoName').value;

    ipcRenderer.send(ADD_TODO, todo);
    event.preventDefault();
  })
</script>
</html>